
import axios from '@/utils/axios'
import {Encrypt } from '@/utils/AES256'

export const devicesGetTotalCountForMy = (params) => {
    return axios.get(`/api/V1/devices/getTotalCount/forMy`, {params: params});
};

export const getDailyQuantitiesAndCostForMy = (params) => {
    return axios.get(`/api/V1/devices/getDailyQuantitiesAndCost/forMy`, {params: params});
};

export const usersLogin = (params) => {
    return axios.get(`/api/V1/users/login`, {params: {username:params.username,pass:Encrypt(params.pass),code:params.code}});
};
export const usersInfoGetInfoForMy = (params) => {
    return axios.get(`/api/V1/usersInfo/getInfo/forMy`, {params: params});
};
export const updatePwdForMy = (params) => {
    params.confirmPassword = Encrypt(params.confirmPassword)
    params.oldPass = Encrypt(params.oldPass)
    params.pass = Encrypt(params.pass)
    return axios.get(`/api/V1/users/updatePwd/forMy`, {params: params});
};
export const getCodeMobile = (params) => {
    return axios.get(`/api/V1/users/getCodeMobile`, {params: {tel:Encrypt(params.tel)}});
};
export const mobileAuthCode = (params) => {
    return axios.get(`/api/V1/users/mobileAuthCode`, {params: {tel:Encrypt(params.tel),codeMobile:params.codeMobile}});
};
export const customerGetCustomerListForMy = (params) => {
    return axios.get(`/api/V1/customer/getCustomerList/forMy`, {params: params});
};
export const areaGetAreaForMy = (params) => {
    return axios.get(`/api/V1/area/getArea/forMy`, {params: params});
};
export const companyGetCompanyTreeForMy = (params) => {
    return axios.get(`/api/V1/company/getCompanyTree/forMy`, {params: params});
};










